﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;

namespace ProjetoComperio.Framework.Web.Security.HtmlMessages
{
    public class HtmlMessageUtility
    {
        public class Messages
        {
            public const string ENABLESTUDENT = "ProjetoComperio.Framework.Web.Security.HtmlMessages.EnableStudent.htm";
            public const string CONTRIBUTIONNEWS = "ProjetoComperio.Presentation.Web.GlobalResources.HtmlMessages.ContributionNews.htm";
            
            public const string ENABLECONTRIBUTION = "ProjetoComperio.Presentation.Web.GlobalResources.HtmlMessages.EnableContribution.htm";

        }

        public static HtmlMessage GetHtmlMessage(string htmlMessage, Type classTypeInNamespace)
        {
            return new HtmlMessage(new StreamReader(Assembly.GetAssembly(classTypeInNamespace).GetManifestResourceStream(htmlMessage)).ReadToEnd());

        }

    }
}
